#!/bin/sh

HAASUI_TOPDIR=$(dirname $(realpath $0))

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HAASUI_TOPDIR/lib

if [ ! -e /etc/miniapp/.mount ]; then
    mkdir -p $HAASUI_TOPDIR/data
    mount --bind $HAASUI_TOPDIR/etc/miniapp /etc/miniapp
    mount --bind $HAASUI_TOPDIR/data /data
    touch /etc/miniapp/.mount
fi

$HAASUI_TOPDIR/bin/walos

